package cn.zjl.testlogin.search;

import lombok.Data;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

@Data
@ToString
public class PageResult<T> implements Serializable {

    private long total; // 总页数

    private List<T> data; // 数据源

    // 自定义方法
    public static <T> PageResult  of (long total, List<T> data){
        return new PageResult(total,data);
    }

    public PageResult() {
        super();
    }

    public PageResult(long total, List<T> data) {
        this.total = total;
        this.data = data;
    }
}
